-
Notifications
You must be signed in to change notification settings - Fork 337
[python] add emitter options and docs #6537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
|
No changes needing a change description found. |
Collaborator
|
You can try these changes here
|
msyyc
reviewed
Mar 20, 2025
3 tasks
…hon/updateOptions
…typespec into python/updateOptions
tadelesh
reviewed
Mar 21, 2025
…hon/updateOptions
…typespec into python/updateOptions
timotheeguerin
approved these changes
Mar 21, 2025
…hon/updateOptions
…typespec into python/updateOptions
67a9791 to
4e42816
Compare
msyyc
reviewed
Mar 24, 2025
mario-guerra
pushed a commit
that referenced
this pull request
Apr 2, 2025
1. Update to `@azure-tools/typespec-client-generator-core` version `0.53.0` (and update corresponding libraries 2. Have your library's emitter options in `lib.ts` extend from tcgc's `SdkEmitterOptions` ([code](https://github.com/microsoft/typespec/pull/6537/files#diff-312d0aa386e3732696ebc167c3a63647ce3d44791fbe44392b01042119635f87R9)) 3. Spread `SdkEmitterOptionsSchema.properties` into the implementation of your options ([code](https://github.com/microsoft/typespec/pull/6537/files#diff-312d0aa386e3732696ebc167c3a63647ce3d44791fbe44392b01042119635f87R57)) - If you haven't added documentation for each of your emitter options, be sure to include them so they properly render in the website 4. Split your flags between your unbranded and branded emitter. Include only `azure` specific flags in your branded emitter 5. Now, we need to make sure these changes get published to the website. Follow the remaining steps if you haven't already started adding website documentation 6. Suggestion is to add `"regen-docs": "node ../../packages/tspd/cmd/tspd.js doc . --enable-experimental --output-dir ../../website/src/content/docs/docs/emitters/clients/http-client-<emitter-name>/reference --skip-js"` to your `package.json` - Make sure you pull from main before doing this step and building `tspd` - If you have any custom documentation in your `README.md`, this will overwrite everything. If you have any extra handwritten content you'd like to add, you can add `.tspd/docs/usage.md` file, and that will get injected into your readme 7. Add `npm run regen-docs` to your generation pipeline - I added it in [`Generate.ps1`](https://github.com/microsoft/typespec/pull/6537/files#diff-d01183da000e95538fa4d2d813fb61cc208ffc624c406f53a0a8c22047d106a0R13) 8. Add an entry into [`website/src/content/current-sidebar.ts`](https://github.com/microsoft/typespec/pull/6537/files#diff-2dedc394c7548f077bab3ebbc97904b254707dc4107e83bbd841d34900b7a202R153) with your emitter --------- Co-authored-by: iscai-msft <isabellavcai@gmail.com> Co-authored-by: tadelesh <tadelesh.shi@live.cn>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@azure-tools/typespec-client-generator-coreversion0.53.0(and update corresponding librarieslib.tsextend from tcgc'sSdkEmitterOptions(code)SdkEmitterOptionsSchema.propertiesinto the implementation of your options (code)azurespecific flags in your branded emitter"regen-docs": "node ../../packages/tspd/cmd/tspd.js doc . --enable-experimental --output-dir ../../website/src/content/docs/docs/emitters/clients/http-client-<emitter-name>/reference --skip-js"to yourpackage.jsontspdREADME.md, this will overwrite everything. If you have any extra handwritten content you'd like to add, you can add.tspd/docs/usage.mdfile, and that will get injected into your readmenpm run regen-docsto your generation pipelineGenerate.ps1website/src/content/current-sidebar.tswith your emitter